Processing math: 100%

mtx_mult Interface

public interface mtx_mult

An interface to the matrix multiplication routines.


Module Procedures

private subroutine mtx_mult_mtx(transa, transb, alpha, a, b, beta, c, err)

Performs the matrix operation C=αAB+βC.

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: transa

A logical flag indicating if the matrix A should be transposed.

logical, intent(in) :: transb

A logical flag indicating if the matrix B should be transposed.

real(kind=real64), intent(in) :: alpha

The scalar α to multiply the product of A and B.

real(kind=real64), intent(in), dimension(:,:) :: a

The matrix A in the operation.

real(kind=real64), intent(in), dimension(:,:) :: b

The matrix B in the operation.

real(kind=real64), intent(in) :: beta

The scalar β to multiply the matrix C.

real(kind=real64), intent(inout), dimension(:,:) :: c

The matrix C in the operation.

class(errors), intent(inout), optional, target :: err

An error object to report any errors that occur.

private subroutine mtx_mult_vec(trans, alpha, a, b, beta, c, err)

Performs the matrix-vector operation C=αAB+βC.

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: trans

A logical flag indicating if the matrix A should be transposed.

real(kind=real64), intent(in) :: alpha

The scalar α to multiply the product of A and B.

real(kind=real64), intent(in), dimension(:,:) :: a

The matrix A in the operation.

real(kind=real64), intent(in), dimension(:) :: b

The vector B in the operation.

real(kind=real64), intent(in) :: beta

The scalar β to multiply the vector C.

real(kind=real64), intent(inout), dimension(:) :: c

The vector C in the operation.

class(errors), intent(inout), optional, target :: err

An error object to report any errors that occur.

private subroutine cmtx_mult_mtx(opa, opb, alpha, a, b, beta, c, err)

Performs the matrix operation C=αAB+βC.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: opa

An integer flag indicating the operation to perform on matrix A. Possible options are:

  • LA_NO_OPERATION: No operation is performed on matrix.

  • LA_TRANSPOSE: The transpose of matrix is used.

  • LA_HERMITIAN_TRANSPOSE: The Hermitian transpose of matrix is used.

integer(kind=int32), intent(in) :: opb

An integer flag indicating the operation to perform on matrix B. Possible options are:

  • LA_NO_OPERATION: No operation is performed on matrix.

  • LA_TRANSPOSE: The transpose of matrix is used.

  • LA_HERMITIAN_TRANSPOSE: The Hermitian transpose of matrix is used.

complex(kind=real64), intent(in) :: alpha

The scalar α to multiply the product of A and B.

complex(kind=real64), intent(in), dimension(:,:) :: a

The matrix A in the operation.

complex(kind=real64), intent(in), dimension(:,:) :: b

The matrix B in the operation.

complex(kind=real64), intent(in) :: beta

The scalar β to multiply the matrix C.

complex(kind=real64), intent(inout), dimension(:,:) :: c

The matrix C in the operation.

class(errors), intent(inout), optional, target :: err

An error object to report any errors that occur.

private subroutine cmtx_mult_vec(opa, alpha, a, b, beta, c, err)

Performs the matrix-vector operation C=αAB+βC.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: opa

An integer flag indicating the operation to perform on matrix A. Possible options are:

  • LA_NO_OPERATION: No operation is performed on matrix.

  • LA_TRANSPOSE: The transpose of matrix is used.

  • LA_HERMITIAN_TRANSPOSE: The Hermitian transpose of matrix is used.

complex(kind=real64), intent(in) :: alpha

The scalar α to multiply the product of A and B.

complex(kind=real64), intent(in), dimension(:,:) :: a

The matrix A in the operation.

complex(kind=real64), intent(in), dimension(:) :: b

The vector B in the operation.

complex(kind=real64), intent(in) :: beta

The scalar β to multiply the vector C.

complex(kind=real64), intent(inout), dimension(:) :: c

The vector C in the operation.

class(errors), intent(inout), optional, target :: err

An error object to report any errors that occur.